/**
 * com.future CO.,ltd.
 */

package com.future.springcloud.controller;

import com.future.springcloud.entities.Payment;
import com.future.springcloud.entities.util.CommonResult;
import com.future.springcloud.service.PaymentFeignService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 类说明：
 */
@RestController
@RequestMapping(value = "/comsumer/order")
public class OrderFeignController {

    @Resource
    private PaymentFeignService feignService;

    @GetMapping(value = "/get/{id}")
    @ResponseBody
    public CommonResult<Payment> getPaymentById(@PathVariable("id") Long id) {
        return feignService.getPaymentById(id);
    }

    @GetMapping(value = "lb")
    public CommonResult<String> testLB() {
        return new CommonResult<String>(10, feignService.testLB());
    }
}
